home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 031a / winsql20.zip / EXAMPLEB.GBL < prev    next >
Text File  |  1991-10-26  |  8KB  |  198 lines

  1. '
  2. '  SQL.GBL - Header file for Orion SQL Application Programming Interface
  3. '
  4. '  LANGUAGE      : Microsoft Visual Basic 1.00
  5. '  MODEL         : N/A
  6. '  ENVIRONMENT   : Microsoft Windows 3.0
  7. '
  8. '  Developed by:
  9. '    Philip Roll
  10. '    Ming-Li Wang
  11. '
  12. '  (C) Copyright 1991
  13. '  Stellar Industries
  14. '  3335 S. Falcon Ridge Road
  15. '  Diamond Bar  CA 91765
  16. '  (714) 861-7885
  17.  
  18. '  Data classes:
  19.  
  20. Global Const SqlDataClassAPPROXIMATE = 0
  21. Global Const SqlDataClassBINARY = 1
  22. Global Const SqlDataClassCHAR = 2
  23. Global Const SqlDataClassEXACT = 3
  24. Global Const SqlDataClassINVALID = 4
  25.  
  26. '  Data types:
  27.  
  28. Global Const SqlDataTypeBINARY = 0
  29. Global Const SqlDataTypeCHAR = 1
  30. Global Const SqlDataTypeDECIMAL = 2
  31. Global Const SqlDataTypeDOUBLE = 3
  32. Global Const SqlDataTypeFLOAT = 4
  33. Global Const SqlDataTypeINTEGER = 5
  34. Global Const SqlDataTypeNUMERIC = 6
  35. Global Const SqlDataTypeREAL = 7
  36. Global Const SqlDataTypeSMALLINT = 8
  37. Global Const SqlDataTypeVARCHAR = 9
  38. Global Const SqlDataTypeINVALID = 10
  39.  
  40. '  Error codes:
  41.  
  42. Global Const SqlErrorAmbiguousColumn = 1
  43. Global Const SqlErrorBadEnvironment = 2
  44. Global Const SqlErrorBinaryNotAllowed = 3
  45. Global Const SqlErrorCannotActivateFile = 4
  46. Global Const SqlErrorCannotCloseFile = 5
  47. Global Const SqlErrorCannotCloseLog = 6
  48. Global Const SqlErrorCannotCreateDataFile = 7
  49. Global Const SqlErrorCannotCreateDumpFile = 8
  50. Global Const SqlErrorCannotCreateFile = 9
  51. Global Const SqlErrorCannotCreateKeyFile = 10
  52. Global Const SqlErrorCannotCreateLog = 11
  53. Global Const SqlErrorCannotDeleteFile = 12
  54. Global Const SqlErrorCannotDropTable = 13
  55. Global Const SqlErrorCannotOpenDataFile = 14
  56. Global Const SqlErrorCannotOpenFile = 15
  57. Global Const SqlErrorCannotOpenKeyFile = 16
  58. Global Const SqlErrorCannotOpenLog = 17
  59. Global Const SqlErrorCannotRemoveTable = 18
  60. Global Const SqlErrorCharNotAllowed = 19
  61. Global Const SqlErrorCheckpointDetected = 20
  62. Global Const SqlErrorDataFileCorrupted = 21
  63. Global Const SqlErrorDatabaseCorrupt = 22
  64. Global Const SqlErrorDbaNotAvailable = 23
  65. Global Const SqlErrorDivideByZero = 24
  66. Global Const SqlErrorDuplicateColumn = 25
  67. Global Const SqlErrorDuplicateRecord = 26
  68. Global Const SqlErrorExistingDataFile = 27
  69. Global Const SqlErrorExistingKeyFile = 28
  70. Global Const SqlErrorFileReadFailed = 29
  71. Global Const SqlErrorFileSeekFailed = 30
  72. Global Const SqlErrorFileWriteFailed = 31
  73. Global Const SqlErrorGlobalLockFailed = 32
  74. Global Const SqlErrorGlobalUnlockFailed = 33
  75. Global Const SqlErrorImportParseError = 34
  76. Global Const SqlErrorIncompatibleTypes = 35
  77. Global Const SqlErrorIndexExists = 36
  78. Global Const SqlErrorIndexUndoFailed = 37
  79. Global Const SqlErrorInitializationFailed = 38
  80. Global Const SqlErrorInsufficientBuffer = 39
  81. Global Const SqlErrorInternalError = 40
  82. Global Const SqlErrorInvalidColumnSpec = 41
  83. Global Const SqlErrorInvalidColumnType = 42
  84. Global Const SqlErrorInvalidCursor = 43
  85. Global Const SqlErrorInvalidData = 44
  86. Global Const SqlErrorInvalidEscapeChar = 45
  87. Global Const SqlErrorInvalidPattern = 46
  88. Global Const SqlErrorInvalidTableID = 47
  89. Global Const SqlErrorInvalidUser = 48
  90. Global Const SqlErrorKeyFileCorrupted = 49
  91. Global Const SqlErrorListSizesUnequal = 50
  92. Global Const SqlErrorMultipleSelects = 51
  93. Global Const SqlErrorNoColumnExists = 52
  94. Global Const SqlErrorNoIndexExists = 53
  95. Global Const SqlErrorNoOldRecord = 54
  96. Global Const SqlErrorNoTableExists = 55
  97. Global Const SqlErrorNoUserExists = 56
  98. Global Const SqlErrorNodeSizeTooSmall = 57
  99. Global Const SqlErrorNotAggregate = 58
  100. Global Const SqlErrorNotGroupingColumn = 59
  101. Global Const SqlErrorNotInGroupedTable = 60
  102. Global Const SqlErrorNotSingleRecord = 61
  103. Global Const SqlErrorNullInNotNullCol = 62
  104. Global Const SqlErrorNullNotAllowed = 63
  105. Global Const SqlErrorParserSyntaxError = 64
  106. Global Const SqlErrorParserStackOverflow = 65
  107. Global Const SqlErrorPrecisionConflict = 66
  108. Global Const SqlErrorResultTableExists = 67
  109. Global Const SqlErrorScaleOverflow = 68
  110. Global Const SqlErrorSecurityViolation = 69
  111. Global Const SqlErrorSetFunctionsNested = 70
  112. Global Const SqlErrorStarNotAllowed = 71
  113. Global Const SqlErrorSubqueryNotOneColumn = 72
  114. Global Const SqlErrorTableConflict = 73
  115. Global Const SqlErrorTableExists = 74
  116. Global Const SqlErrorTooManyColumnNames = 75
  117. Global Const SqlErrorTooManyTablesOpen = 76
  118. Global Const SqlErrorTrialSizeExceeded = 77
  119. Global Const SqlErrorVariableHeaderMark = 78
  120. Global Const SqlErrorVariableHeaderSize = 79
  121. Global Const SqlErrorVariableHeaderWrong = 80
  122. Global Const SqlErrorVariableHeaderZero = 81
  123. Global Const SqlErrorWrongVersion = 82
  124.  
  125. '  Record structure formats:
  126.  
  127. Global Const SqlFlagFormatPadded = 0
  128. Global Const SqlFlagFormatString = 1
  129. Global Const SqlFlagFormatStructure = 2
  130.  
  131. '  Auto commit options:
  132.  
  133. Global Const SqlFlagAutoCommitOnLogout = 16
  134.  
  135. '  Maximum number of significant characters in named entity:
  136.  
  137. Global Const SqlMaximumNameLength = 32
  138.  
  139. '  Global types:
  140.  
  141. Type SqlColumnType
  142.   RightJustified As Integer
  143.   ColumnHeading As String * 33
  144.   ColumnSequenceNumber As Integer
  145.   DataType As Integer
  146.   DataClass As Integer
  147.   FieldWidth As Integer
  148.   Precision As Integer
  149.   Scale As Integer
  150. End Type
  151.  
  152. Type SqlControlType
  153.   ErrorDetail As String * 65
  154.   ErrorMessage As String * 257
  155.   HiLiteLength As Integer
  156.   HiLiteOffset As Integer
  157.   Padding As Integer
  158.   RecordBufferSize As Integer
  159.   ResultCode As Integer
  160.   RecordPosition As Long
  161.   Reserved0 As Long
  162.   Reserved1 As Long
  163.   Reserved2 As Long
  164.   Reserved3 As Long
  165.   Reserved4 As Long
  166.   Flags As Integer
  167. End Type
  168.  
  169. Type SqlStatusType
  170.   NumberOfRecordDeletes As Long
  171.   NumberOfRecordInserts As Long
  172.   NumberOfRecordSelects As Long
  173.   NumberOfRecordUpdates As Long
  174.   TimeElapsed As Long
  175. End Type
  176.  
  177. Type SqlTableType
  178.   NumberOfColumns As Integer
  179.   RecordSize As Integer
  180.   NumberOfRecords As Long
  181. End Type
  182.  
  183. '  Function prototypes:
  184.  
  185. Declare Function SqlCursorClose Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType) As Integer
  186. Declare Function SqlCursorOpen Lib "sql.dll" (ByVal User As Integer, SqlControl As SqlControlType) As Integer
  187. Declare Function SqlDescribeColumn Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal ColumnNumber As Integer, SqlColumn As SqlColumnType) As Integer
  188. Declare Function SqlDescribeTable Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, SqlTable As SqlTableType) As Integer
  189. Declare Function SqlExecute Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal QueryText As String) As Integer
  190. Declare Function SqlFetchFirst Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  191. Declare Function SqlFetchLast Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  192. Declare Function SqlFetchNext Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  193. Declare Function SqlFetchPositioned Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordPosition As Long, ByVal RecordBuffer As String) As Integer
  194. Declare Function SqlFetchPrevious Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  195. Declare Function SqlGetStatus Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, SqlStatus As SqlStatusType) As Integer
  196. Declare Function SqlLogin Lib "sql.dll" (SqlControl As SqlControlType, ByVal UserName As String, ByVal UserPassword As String) As Integer
  197. Declare Function SqlLogout Lib "sql.dll" (ByVal User As Integer, SqlControl As SqlControlType) As Integer
  198.